package mortal.game.control
{
    import modules.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;
    import mortal.mvc.interfaces.*;

    public class GuideOptController extends Controller
    {

        public function GuideOptController()
        {
            
        }

        public function stageResize() : void
        {
            if (_view && !_view.isHide)
            {
                (view as GuideOptModule).stageResize();
            }
            
        }

        private function onGuideOptHandler(event:DataEvent) : void
        {
            view.update(event.data);
            if (view.isHide)
            {
                view.show();
            }
            
        }

        override protected function initServer() : void
        {
            super.initServer();
            Dispatcher.addEventListener(EventName.Guide_SceneFight, this.onGuideOptHandler);
            
        }

        override protected function initView() : IView
        {
            var _loc_1:GuideOptModule = null;
            _loc_1 = new GuideOptModule();
            _loc_1.layer = LayerManager.uiLayer;
            return _loc_1;
        }

    }
}
